#pragma once
#include "ZPackage.h"


class ZNETLIB_EXPORT ZPackReactor : public QObject			//
{
public:
	ZPackReactor(void) {};
	virtual ~ZPackReactor(void) {};

public:
	virtual void DealPackage(const ZPackage& pack) const = 0;
	virtual	const QString GetCarePackType() = 0;
};

class ZPackReactorMgr
{
	typedef std::multimap<QString, ZPackReactor*> ReactorMap;
public:
	ZPackReactorMgr() {};
	~ZPackReactorMgr();

public:
	void DealPackage(const ZPackage& pack) const;

public:
	void RegReactor(ZPackReactor* pReactor);
	void UnRegReactor(ZPackReactor* pReactor);
	void UnRegReactor(const QString& reactorType);

private:
	ReactorMap  m_reactorMap;
};